#!/usr/bin/ruby
# Author: Foung Vang
# Assignment: Intermediate

monster1 = {:health => 500}
monster2 = {:health => 500}


for i in 1..5
	puts "ROUND #{i}:"
	attack_damage = rand(1..100)

	puts "monster1 attacks monster2 with %d damage" % [attack_damage]
	puts "monster2's health is now %d/500" % monster2[:health] -= attack_damage

	attack_damage = rand(1..100)
	puts "monster2 attacks monster1 with %d damage" % [attack_damage]
	puts "monster1's health is now %d/500" % monster1[:health] -= attack_damage

	if monster1[:health] > monster2[:health]
		puts "\n\nmonster1 wins the game!"
	else
		puts "\n\nmonster2 wins the game!"
	end

end